let basic = [
  // user

  {
    path: '/api/user',
    component: '../layouts/UserLayout',
    routes: [
      { path: '/api/user', redirect: '/user/login' },
      { path: '/api/user/login', component: './User/Login' },
      { path: '/api/user/register', component: './User/Register' },
      { path: '/api/user/register-result', component: './User/RegisterResult' },
    ],
  },
  // app
  {
    path: '/api',
    component: '../layouts/BasicLayout',
    Routes: ['src/pages/Authorized'],
    authority: ['admin', 'user'],
    routes: [
      // {
      //   path: '/api/index',
      //   name: '首页',
      //   component: './Index/index',
      // }
      // ,

      {
        name: '商品分类',
        icon: 'check-circle-o',
        path: '/api/Category',
        routes: [
          {
            path: '/api/Category/Category',
            name: 'category',
            component: './Category/Category',
          },
           {
            path: '/api/Category/CategoryList',
            name: '分类管理',
            component: './Category/CategoryList',
          }
        ]
      },
      {
        name: '商品',
        icon: 'check-circle-o',
        path: '/api/ProductList',
        routes: [
          {
            path: '/api/ProductList/ListStep',
            component: './ProductList/ListStep',
          },
          { 
            path: '/api/ProductList/List',
            name: '商品',
          component:'./ProductList/List',
        }
        ],
      },
<<<<<<< HEAD
      {
        name: '商品分类',
        icon: 'check-circle-o',
        path: '/api',
        routes: [
          {
            path: '/api/Category/Category',
            name: 'category',
            component: './Category/Category',
          },
           {
            path: '/api/Category/CategoryList',
            name: '分类管理',
            component: './Category/CategoryList',
          }
        ]
      },
=======

>>>>>>> c12cdb6253b8ecc5937b35420ad5651a7183ee2f
      {
        name: 'exception',
        icon: 'warning',
        path: '/api/exception',
        routes: [
          // exception
          {
            path: '/api/exception/403',
            name: 'not-permission',
            component: './Exception/403',
          },
          {
            path: '/api/exception/404',
            name: 'not-find',
            component: './Exception/404',
          },
          {
            path: '/api/exception/500',
            name: 'server-error',
            component: './Exception/500',
          },
          {
            path: '/api/exception/trigger',
            name: 'trigger',
            hideInMenu: true,
            component: './Exception/TriggerException',
          },
        ],
      },
      {
        name: 'result',
        icon: 'check-circle-o',
        path: '/api/result',
        routes: [
          // result
          {
            path: '/api/result/success',
            name: 'success',
            component: './Result/Success',
          },
          { path: '/api/result/fail',
           name: 'fail',
            component: './Result/Error' 
          },
        ],
      },
      {
        path: '/api/profile',
        name: 'profile',
        icon: 'profile',
        routes: [
          // profile
          {
            path: '/api/profile/basic',
            name: 'basic',
            component: './Profile/BasicProfile',
          },
          {
            path: '/api/profile/advanced',
            name: 'advanced',
            authority: ['admin'],
            component: './Profile/AdvancedProfile',
          },
        ],
      },
      {
        component: '404',
      },
    ],
  },
];
export default [
  {
    path:'api',
    routes:basic
  }
]
